package ch11.d2;

public class MyThread2 implements Runnable{

    @Override
    public void run() {
        for (int i = 0; i < 100; i++) {
            //Thread.currentThread() 获取当前线程
            System.out.println(Thread.currentThread().getName()+":"+i);
//            try {
//                Thread.sleep(1000);
//            } catch (InterruptedException e) {
//                throw new RuntimeException(e);
//            }
        }
    }
}
